

package com.example.administrator.caigou51.recyclerCard.cardView;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.ab.util.AbViewUtil;
import com.example.administrator.caigou51.EventBusClass.CheckOrderActivityToSumit;
import com.example.administrator.caigou51.EventBusClass.CheckOrderSetValue;
import com.example.administrator.caigou51.EventBusClass.GotoFragment;
import com.example.administrator.caigou51.R;
import com.example.administrator.caigou51.activity.AddressManagementActivity;
import com.example.administrator.caigou51.activity.CheckOrderActivity;
import com.example.administrator.caigou51.activity.GBaseActivity;
import com.example.administrator.caigou51.activity.GoodsListActivity;
import com.example.administrator.caigou51.activity.MainActivity;
import com.example.administrator.caigou51.activity.StoreManagerActivity;
import com.example.administrator.caigou51.bean.CheckOrderBean;
import com.example.administrator.caigou51.control.DialogGoodsBuy;
import com.example.administrator.caigou51.global.App;
import com.example.administrator.caigou51.global.Constant;
import com.example.administrator.caigou51.recyclerCard.basic.CardItemView;
import com.example.administrator.caigou51.recyclerCard.basic.MaterialListAdapter;
import com.example.administrator.caigou51.recyclerCard.basic.MaterialListView;
import com.example.administrator.caigou51.recyclerCard.card.CheckOrderCard;
import com.example.administrator.caigou51.recyclerCard.card.OneGoodsCard;
import com.example.administrator.caigou51.recyclerCard.card.ShopCarCard;
import com.example.administrator.caigou51.request.BaseResponse;
import com.example.administrator.caigou51.request.ICallBackForRequestServer;
import com.example.administrator.caigou51.request.RequestServerManager;
import com.example.administrator.caigou51.util.ImageUtil;
import com.example.administrator.caigou51.util.ToastUtil;
import com.example.administrator.caigou51.widget.dialog.SweetDialogManager;

import java.io.Serializable;

import cn.pedant.SweetAlert.SweetAlertDialog;
import de.greenrobot.event.EventBus;


public class CheckOrderCardView extends CardItemView<CheckOrderCard> implements View.OnClickListener{
 	private Context mContext;
    private View includeLayout;
    private RelativeLayout relativeLayoutAddress;
    private TextView textViewName;
    private TextView textViewTel;
    private ImageView imageViewLocation;
    private TextView textView_add;
    private ImageView imageViewAddressMore;
    private RelativeLayout relativeLayoutOneGoods;
    private ImageView imageViewGoods;
    private TextView textViewGoodsName;
    private TextView textViewMoneyIcon;
    private TextView textViewGoodsPrice;
    private TextView textViewGoodsCount;
    private EditText editTextBeiZhu;
    private ImageView imageViewStoreMore;
    private TextView textViewFaPiaoXinXi;
    private TextView textViewChuXiao;
    private TextView textViewGoodsJinE;
    private TextView textViewYouHuiJinE;
    private com.example.administrator.caigou51.recyclerCard.basic.MaterialListView materialListviewHor;
    private TextView textViewCount;
    private RelativeLayout relativeLayoutGuangDong;
    private  CheckOrderCard checkOrderCard;
    private ImageView imageViewSellAll,imageViewdel;
    private TextView textViewSellScopen,textViewTips,textViewPeiSongYunFei;
    public CheckOrderCardView(Context context) {
        super(context);
        mContext=context;

        // TODO Auto-generated constructor stub
    }

    public CheckOrderCardView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext=context;
        // TODO Auto-generated constructor stub
    }

    public CheckOrderCardView(Context context,
                              AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mContext=context;
        // TODO Auto-generated constructor stub
    }
    @Override
    public void build(final CheckOrderCard card) {
        // TODO Auto-generated method stub
        super.build(card);
        this.checkOrderCard=card;
        textViewTips = (TextView) findViewById(R.id.textViewTips);
        textViewPeiSongYunFei = (TextView) findViewById(R.id.textViewPeiSongYunFei);
        imageViewdel= (ImageView) findViewById(R.id.imageViewdel);
        imageViewSellAll= (ImageView) findViewById(R.id.imageViewSellAll);
        textViewSellScopen= (TextView) findViewById(R.id.textViewSellScopen);
        relativeLayoutGuangDong=(RelativeLayout) findViewById(R.id.relativeLayoutGuangDong);
        relativeLayoutAddress = (RelativeLayout) findViewById(R.id.relativeLayoutAddress);relativeLayoutAddress.setOnClickListener(this);
        textViewName = (TextView) findViewById(R.id.textViewName);
        textViewTel = (TextView) findViewById(R.id.textViewTel);
        imageViewLocation = (ImageView) findViewById(R.id.imageViewLocation);
        textView_add = (TextView) findViewById(R.id.textView_add);
        imageViewAddressMore = (ImageView) findViewById(R.id.imageViewAddressMore);
        relativeLayoutOneGoods = (RelativeLayout) findViewById(R.id.relativeLayoutOneGoods);
        imageViewGoods = (ImageView) findViewById(R.id.imageViewGoods);
        textViewGoodsName = (TextView) findViewById(R.id.textViewGoodsName);
        textViewMoneyIcon = (TextView) findViewById(R.id.textViewMoneyIcon);
        textViewGoodsPrice = (TextView) findViewById(R.id.textViewGoodsPrice);
        textViewGoodsCount = (TextView) findViewById(R.id.textViewGoodsCount);
        editTextBeiZhu = (EditText) findViewById(R.id.editTextBeiZhu);
        imageViewStoreMore = (ImageView) findViewById(R.id.imageViewStoreMore);imageViewStoreMore.setVisibility(View.GONE);
        textViewFaPiaoXinXi = (TextView) findViewById(R.id.textViewFaPiaoXinXi);
        textViewChuXiao = (TextView) findViewById(R.id.textViewChuXiao);
        textViewGoodsJinE = (TextView) findViewById(R.id.textViewGoodsJinE);
        textViewYouHuiJinE = (TextView) findViewById(R.id.textViewYouHuiJinE);
        materialListviewHor = (com.example.administrator.caigou51.recyclerCard.basic.MaterialListView) findViewById(R.id.materialListviewHor);
        textViewCount = (TextView) findViewById(R.id.textViewCount);
        includeLayout=findViewById(R.id.includeLayout);includeLayout.setOnClickListener(this);


        imageViewStoreMore.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                editTextBeiZhu.setText("");
            }
        });
        editTextBeiZhu.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                    String ss=s.toString();
                if (!TextUtils.isEmpty(ss) && ss.length()>0)
                {
                    imageViewStoreMore.setVisibility(View.VISIBLE);
                    CheckOrderSetValue checkOrderSetValue=new CheckOrderSetValue();
                    checkOrderSetValue.setNote(ss);
                    EventBus.getDefault().post(checkOrderSetValue);
                }else
                {
                    imageViewStoreMore.setVisibility(View.GONE);
                }
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });
        textViewName.setText(getDefaultAddress(card).getUsername());
        textViewTel.setText(getDefaultAddress(card).getMobile());
        //这里后台有点坑，2个不一样的字段
        if (TextUtils.isEmpty(getDefaultAddress(card).getAreaname())) {
            textView_add.setText(getDefaultAddress(card).getRegion_name() + getDefaultAddress(card).getAddress());
        }else
        {
            textView_add.setText(getDefaultAddress(card).getAreaname() + getDefaultAddress(card).getAddress());
        }
        //判断是否多个商品
        if (card.getCheckOrderBean().getGoods().size()>1) {
            relativeLayoutOneGoods.setVisibility(View.GONE);
            includeLayout.setVisibility(View.VISIBLE);

            LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false);
            materialListviewHor.setLayoutManager(linearLayoutManager);
            materialListviewHor.getLayoutParams().height = AbViewUtil.scaleValue(mContext, 110);
            materialListviewHor.setTag(AbViewUtil.NotScale);
            materialListviewHor.clear();
            boolean havaGuangDong=false;
            for (int i = 0; i < card.getCheckOrderBean().getGoods().size(); i++) {
                if (i<5) {
                    OneGoodsCard oneGoodsCard = new OneGoodsCard(mContext);
                    oneGoodsCard.setGoodsEntity(card.getCheckOrderBean().getGoods().get(i));
                    oneGoodsCard.setGoodsEntityList(card.getCheckOrderBean().getGoods());
                    materialListviewHor.add(oneGoodsCard);
                }
                if ("2".equals(card.getCheckOrderBean().getGoods().get(i).getSale_range())) {
                    havaGuangDong=true;
                }
            }
            //是否有只限广东商品
            if (havaGuangDong)
            {
                if (TextUtils.isEmpty(getDefaultAddress(card).getAreaname())) {
                    //默认地址是否包含广东
                    if (getDefaultAddress(card).getRegion_name().contains("广东"))
                    {
                        card.getRelativeLayoutTips().setVisibility(View.GONE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                EventBus.getDefault().post(new CheckOrderActivityToSumit());

                            }
                        });
                     //   card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
                     //  card.getTextViewSumit().setEnabled(true);
                    }else
                    {
                        card.getRelativeLayoutTips().setVisibility(View.VISIBLE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity) mContext, "       无法下单结算\n请删除只限广东商品!", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        sweetAlertDialog.dismiss();
                                    }
                                }, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        Intent intent33=new Intent(mContext, GoodsListActivity.class);
                                        intent33.putExtra(GoodsListActivity.TagList, (Serializable) checkOrderCard.getCheckOrderBean().getGoods());
                                        mContext.startActivity(intent33);
                                        sweetAlertDialog.dismiss();
                                    }
                                },"我知道了","去删除");
                            }
                        });
                      //  card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.color_b8bebe));
                     //   card.getTextViewSumit().setEnabled(false);
                    }
                }else
                {
                    if (getDefaultAddress(card).getAreaname().contains("广东"))
                    {
                        card.getRelativeLayoutTips().setVisibility(View.GONE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                EventBus.getDefault().post(new CheckOrderActivityToSumit());
                            }
                        });
                     //   card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
                     //   card.getTextViewSumit().setEnabled(true);
                    }else
                    {
                        card.getRelativeLayoutTips().setVisibility(View.VISIBLE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity) mContext, "       无法下单结算\n请删除只限广东商品!", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        sweetAlertDialog.dismiss();
                                    }
                                }, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        Intent intent33=new Intent(mContext, GoodsListActivity.class);
                                        intent33.putExtra(GoodsListActivity.TagList, (Serializable) checkOrderCard.getCheckOrderBean().getGoods());
                                        mContext.startActivity(intent33);
                                        sweetAlertDialog.dismiss();
                                    }
                                },"我知道了","去删除");
                            }
                        });
                     //   card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.color_b8bebe));
                     //   card.getTextViewSumit().setEnabled(false);
                    }

                }
            }else
            {
                card.getRelativeLayoutTips().setVisibility(View.GONE);
                card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        EventBus.getDefault().post(new CheckOrderActivityToSumit());
                    }
                });
              //  card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
              //  card.getTextViewSumit().setEnabled(true);
            }
         //   materialListviewHor.setOnClickListener(this);
            textViewCount.setText("共"+card.getCheckOrderBean().getGoods().size()+"件");textViewCount.setOnClickListener(this);
        }else
        {
            //(1代表全国，2代表限广东）
            if ("2".equals(card.getCheckOrderBean().getGoods().get(0).getSale_range())) {
                //判断地址是否包含广东省，如果不包含显示不予提交的提示
                //这里后台有点坑，2个不一样的字段
                if (TextUtils.isEmpty(getDefaultAddress(card).getAreaname())) {
                   if (getDefaultAddress(card).getRegion_name().contains("广东"))
                   {
                       card.getRelativeLayoutTips().setVisibility(View.GONE);
                       card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                           @Override
                           public void onClick(View v) {
                             EventBus.getDefault().post(new CheckOrderActivityToSumit());
                           }
                       });
                   //    card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
                   //    card.getTextViewSumit().setEnabled(true);
                   }else
                   {
                       card.getRelativeLayoutTips().setVisibility(View.VISIBLE);
                       card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                           @Override
                           public void onClick(View v) {
                               SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity) mContext, "       无法下单结算\n请删除只限广东商品!", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                   @Override
                                   public void onClick(SweetAlertDialog sweetAlertDialog) {
                                       sweetAlertDialog.dismiss();
                                   }
                               }, new SweetAlertDialog.OnSweetClickListener() {
                                   @Override
                                   public void onClick(SweetAlertDialog sweetAlertDialog) {
                                       taskDelCar((GBaseActivity) mContext,null,card.getCheckOrderBean().getGoods().get(0).getItemid());
                                       sweetAlertDialog.dismiss();
                                   }
                               },"我知道了","去删除");
                           }
                       });
                    //   card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.color_798289));
                    //   card.getTextViewSumit().setEnabled(false);
                   }
                }else
                {
                    if (getDefaultAddress(card).getAreaname().contains("广东"))
                    {
                        card.getRelativeLayoutTips().setVisibility(View.GONE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                EventBus.getDefault().post(new CheckOrderActivityToSumit());
                            }
                        });
                      //  card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
                      //  card.getTextViewSumit().setEnabled(true);
                    }else
                    {
                        card.getRelativeLayoutTips().setVisibility(View.VISIBLE);
                        card.getTextViewSumit().setOnClickListener(new OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity) mContext, "       无法下单结算\n请删除只限广东商品!", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        sweetAlertDialog.dismiss();
                                    }
                                }, new SweetAlertDialog.OnSweetClickListener() {
                                    @Override
                                    public void onClick(SweetAlertDialog sweetAlertDialog) {
                                        taskDelCar((GBaseActivity) mContext,null,card.getCheckOrderBean().getGoods().get(0).getItemid());
                                        sweetAlertDialog.dismiss();
                                    }
                                },"我知道了","去删除");
                            }
                        });
                     //   card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.color_798289));
                     //   card.getTextViewSumit().setEnabled(false);
                    }

                }
                relativeLayoutGuangDong.setVisibility(View.VISIBLE);
                imageViewSellAll.setImageResource(R.drawable.icon_sell_gd);
                textViewSellScopen.setText("销售范围:广东省");
                textViewSellScopen.setTextColor(mContext.getResources().getColor(R.color.red));
                imageViewdel.setVisibility(View.VISIBLE);
                imageViewdel.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //判断是否从购物车进来，是就要删除购物车的商品
                        if (card.getBuyType().equals(CheckOrderActivity.TagTypeShopCar))
                        {
                            SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity)mContext, "删除该商品后订单将无商品,自动调回首页", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                @Override
                                public void onClick(SweetAlertDialog sweetAlertDialog) {
                                    sweetAlertDialog.dismiss();
                                }
                            }, new SweetAlertDialog.OnSweetClickListener() {
                                @Override
                                public void onClick(SweetAlertDialog sweetAlertDialog) {
                                    taskDelCar((GBaseActivity) mContext,null,card.getCheckOrderBean().getGoods().get(0).getItemid());
                                    sweetAlertDialog.dismiss();
                                }
                            });

                        }else
                        {
                            SweetDialogManager.getInstance().showDialogByWarmTitleText((GBaseActivity)mContext, "删除该商品后订单将无商品,自动调回首页", "", false, false, new SweetAlertDialog.OnSweetClickListener() {
                                @Override
                                public void onClick(SweetAlertDialog sweetAlertDialog) {
                                    sweetAlertDialog.dismiss();
                                }
                            }, new SweetAlertDialog.OnSweetClickListener() {
                                @Override
                                public void onClick(SweetAlertDialog sweetAlertDialog) {
                                    Intent intent = new Intent(mContext, MainActivity.class);
                                    mContext.startActivity(intent);
                                    sweetAlertDialog.dismiss();
                                }
                            });

                        }
                    }
                });
            }
            else {

                relativeLayoutGuangDong.setVisibility(View.GONE);
                imageViewSellAll.setImageResource(R.drawable.icon_sell_all);
                textViewSellScopen.setText("销售范围:全国");
                textViewSellScopen.setTextColor(mContext.getResources().getColor(R.color.color_1ca146));
                imageViewdel.setVisibility(View.GONE);

                card.getRelativeLayoutTips().setVisibility(View.GONE);
            //    card.getTextViewSumit().setBackgroundColor(mContext.getResources().getColor(R.color.red));
             //   card.getTextViewSumit().setEnabled(true);
            }
            relativeLayoutOneGoods.setVisibility(View.VISIBLE);
            includeLayout.setVisibility(View.GONE);

            App.displayImageHttpOrFile(card.getCheckOrderBean().getGoods().get(0).getThumb(),imageViewGoods, ImageUtil.OptionsActivity());
            textViewGoodsName.setText(card.getCheckOrderBean().getGoods().get(0).getTitle()+card.getCheckOrderBean().getGoods().get(0).getProduct_spec());
            textViewGoodsPrice.setText(card.getCheckOrderBean().getGoods().get(0).getShip_price());
            textViewGoodsCount.setText("数量:"+card.getCheckOrderBean().getGoods().get(0).getNumber());
        }

        textViewFaPiaoXinXi.setText(getDefaultAddress(card).getCompany_name());
        textViewChuXiao.setText(card.getCheckOrderBean().getOrder_promotion_name());
        textViewGoodsJinE.setText(card.getCheckOrderBean().getTotal_amount()+"");
        textViewYouHuiJinE.setText(card.getCheckOrderBean().getDiscount_amount()+"");
        textViewPeiSongYunFei.setText(getDefaultAddress(card).getShipping_fee());
        textViewTips.setText(getDefaultAddress(card).getText());
    }

    public static CheckOrderBean.AddressEntity getDefaultAddress(CheckOrderCard cardTemp)
    {
        CheckOrderBean.AddressEntity addressEntity=null;
        for (int i=0;i<cardTemp.getCheckOrderBean().getAddress().size();i++)
        {
            if (cardTemp.getCheckOrderBean().getAddress().get(i).getIs_default()==1)
            {
                addressEntity=cardTemp.getCheckOrderBean().getAddress().get(i);
                break;
            }
        }
        return addressEntity;

    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.textViewCount:
                Intent intent33=new Intent(mContext, GoodsListActivity.class);
                intent33.putExtra(GoodsListActivity.TagList, (Serializable) checkOrderCard.getCheckOrderBean().getGoods());
                mContext.startActivity(intent33);
                break;
            case R.id.includeLayout:
                Intent intent=new Intent(mContext, GoodsListActivity.class);
                intent.putExtra(GoodsListActivity.TagList, (Serializable) checkOrderCard.getCheckOrderBean().getGoods());
                mContext.startActivity(intent);
                break;
            case R.id.materialListviewHor:
               /* Intent intent2=new Intent(mContext, GoodsListActivity.class);
                intent2.putExtra(GoodsListActivity.TagList, (Serializable) checkOrderCard.getCheckOrderBean().getGoods());

                mContext.startActivity(intent2);*/
                break;
            case R.id.relativeLayoutAddress:
                Intent intent3=new Intent(mContext, StoreManagerActivity.class);
                intent3.putExtra(StoreManagerActivity.TagFromCheckOrder,StoreManagerActivity.TagFromCheckOrder);
                intent3.putExtra(StoreManagerActivity.TagOrderTotal,checkOrderCard.getCheckOrderBean().getTotal_amount()+"");
                mContext.startActivity(intent3);
                break;
        }
    }

    public  void taskDelCar(final GBaseActivity mContext, MaterialListView materialListView, String ids) {


        RequestServerManager.getInstanceDIY().handleMethodDIY(mContext, materialListView, false, null,
                Constant.getRootUrl() + Constant.Action.Action_DelShopCar, Constant.Action.Action_DelShopCar, RequestServerManager.getInstanceDIY().
                        getRequestParams(Constant.Action.Action_DelShopCar,App.getUserBean().getUserid(),App.getUserBean().getSession_id(),ids), BaseResponse.class, new ICallBackForRequestServer<BaseResponse>() {
                    @Override
                    public void onSuccess(BaseResponse result) {
                        // JSONObject jsonObject = (JSONObject) result.getData();
                        ToastUtil.showToast("操作成功");
                        DialogGoodsBuy.TaskRefreshSaveShopCarData(false);
                        Intent intent = new Intent(mContext, MainActivity.class);
                        mContext.startActivity(intent);
                        EventBus.getDefault().post(new GotoFragment(MainActivity.TAB_ShouYe));
                    }

                    @Override
                    public void onFail(int type, String errorMsg, String json) {
                        ToastUtil.showToast("删除失败");
                    }
                });



   /* private String getCheckIDS() {
        String ids="";
        MaterialListAdapter materialListAdapter= (MaterialListAdapter) material_listview.getAdapter();
        for (int i=0;i<materialListAdapter.getAllList().size();i++)
        {
            ShopCarCard shopCarCard= (ShopCarCard) materialListAdapter.getAllList().get(i);

            if (shopCarCard.getShopCarBean().getCheck())
                ids+=shopCarCard.getShopCarBean().getItemid()+",";

        }
        if (!TextUtils.isEmpty(ids)) {
            ids = ids.substring(0, ids.length() - 1);
        }
        return ids;
    }*/
    }
}
